package com.medi.business.domain;

import com.medi.common.utils.SecurityUtils;
import com.medi.common.utils.uuid.IdUtils;
import lombok.Data;
import com.medi.common.annotation.Excel;
import com.medi.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 需要数据权限控制接口对象 data_interface
 * 
 * @author medi
 * @date 2024-09-13
 */
@Data
public class DataInterface extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private String id;

    /** 数据权限切点值 */
    @Excel(name = "数据权限切点值")
    private String joinPoint;

    /** 控制显示字段json */
    @Excel(name = "控制显示字段json")
    private String fieldsJson;

    /** 切点别名 */
    @Excel(name = "切点别名")
    private String alias;

    /** 业务数据说明 */
    @Excel(name = "业务数据说明")
    private String dataName;

    public void creat() {
        this.setId(IdUtils.fastSimpleUUID());
        this.setCreateTime(new Date());
        this.setCreateBy(SecurityUtils.getNickname());

    }

    public void modif() {
        this.setUpdateTime(new Date());
        this.setUpdateBy(SecurityUtils.getNickname());
    }
}
